home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / utility / ini10.zip / FILESPEC.I < prev    next >
Text File  |  1987-07-03  |  1KB  |  35 lines

  1.  
  2. /*
  3. *    All output pointers to char arrays that are to be "filled in"
  4. *    must have their memory allocated per the #defines herein.
  5. */
  6.  
  7. #define exist(sz)    (!access(sz, 00))    /* #include <io.h> */
  8.  
  9.                 /* input            output         */
  10. #define FILESPEC    64    /* "d:\\path\\filename.ext"     same         */
  11. #define FILESPEC_DRIVE    3    /* "d:", "d" or ""              "d:" or ""   */
  12. #define FILESPEC_PATH    63    /* "\\path\\", ..., "\\" or ""  same         */
  13. #define FILESPEC_NAME    9    /* "filename"                   same         */
  14. #define FILESPEC_EXT    5    /* ".ext", "ext" or ""          ".ext" or "" */
  15.  
  16. struct    CHKDSK {    /* Do NOT change the order of structure elements! */
  17.     unsigned int    uiSectorsPerCluster;    /* A */
  18.     unsigned int    uiAvailableClusters;    /* B */
  19.     unsigned int    uiBytesPerSector;    /* C */
  20.     unsigned int    uiTotalClusters;    /* D */
  21.     long        lTotalDiskSpace;    /* C * A * D */
  22.     long        lAvailableOnDisk;    /* C * A * B */
  23.     unsigned int    uiBytesPerCluster;    /* C * A */
  24.     unsigned int    uiPercentFreeSpace;    /* (B * 100) / D and rounded */
  25.     };
  26.  
  27. extern    char        *MakeFilespec(char *, char *, char *, char *, char *);
  28. extern    void        ParseFilespec(char *, char *, char *, char *, char *);
  29.  
  30. extern    void        chdrv(char *);
  31. extern    struct CHKDSK    chkdsk(char *);
  32. extern    void        verify(int);
  33. extern    int        IsPrnOn(void);    /* M model only */
  34.  
  35.